#ifndef unigame_ILuaCallback_h
#define unigame_ILuaCallback_h

#include <map>

struct lua_State;
namespace unigame
{
	class LuaScript;
	class ILuaCallback
	{
	public:
		ILuaCallback(const char* name);
		virtual ~ILuaCallback();

		char* name()
		{
			return m_name;
		}

		virtual void onCall(LuaScript* s) = 0;
		
		void addScript(LuaScript* s);
		void removeScript(LuaScript* s);

	private:
		char* m_name;
		std::map<lua_State*, LuaScript*> m_scripts;
	};
}

#endif